<div class="layui-card">
    <div class="layui-card-body ">
        <form action=""  class="layui-form">
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <input type="text" name="keywords" value="{$search.keywords|default=''}" class="layui-input" placeholder="导航名称">
                </div>
                <div class="layui-input-inline">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
                    {if isset($search.keywords) || request()->param("nav_id")}
                    <a href="javascript:history.go(-1);" class="layui-btn">返回</a>
                    {/if}
                </div>
            </div>
        </form>
        <form action="{:url('admin/system.nav/delnavmenus',['nav_id'=>request()->param('nav_id')])}" method="post" class="layui-form delete-form" id="cp-form">
            <div class="layui-btn-group">
                <a href="{:url('admin/system.nav/addnavmenus',['nav_id'=>request()->param('nav_id')])}" class="layui-btn layui-btn-xs">
                    <i class="layui-icon layui-icon-addition"></i>
                    添加导航
                </a>
                <button data-url="{:url('admin/system.nav/delnavmenus',['nav_id'=>request()->param('nav_id')])}" class="layui-btn layui-btn-xs layui-btn-danger clearExceptionNode">
                    <i class="layui-icon">&#xe640;</i>
                    删除导航
                </button>
            </div>
            <table class="layui-table">
                <thead>
                <tr>
                    <th width="10">
                        <input type="checkbox" class="layui-input"  lay-skin="primary" lay-filter="select-all">
                    </th>
                    <th width="300">标题</th>
                    <th width="120">访问状态</th>
                    <th width="120">排序</th>
                    <th width="120">层级</th>
                    <th>广告链接</th>
                    <th width="120">操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="navList" id='v'}
                <tr>
                    <td align="center" valign="middle">
                        <input type="checkbox" name="idList[]" class="layui-input" lay-skin="primary" value="{$v.id}">
                    </td>
                    <td>{$v.title}</td>
                    <td>
                        <input type="checkbox" value="{$v.id}"  data-url="{:url('admin/system.nav/editnavmenus',['nav_id'=>request()->param('nav_id')])}"  name="status" lay-filter="status" lay-skin="switch" lay-text="启用|禁用" {eq name="$v.status" value="1" }checked{/eq}>
                    </td>
                    <td align="center" valign="middle">{$v.sort}</td>
                    <td>{$v.pid}</td>
                    <td>{$v.url_link}</td>
                    <td align="center" valign="middle">
                        <a href="{:url('admin/system.nav/editnavmenus',['id'=>$v['id'],'nav_id'=>request()->param('nav_id')])}" class="layui-btn layui-btn-xs">编辑</a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            {$navList|raw}
        </form>
    </div>
</div>